﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SAM.Framework.ILicence
{
    /// <summary>
    /// Licence存储器实现
    /// </summary>
    public interface ILicenceRepository
    {
        /// <summary>
        /// 存储授权信息
        /// </summary>
        /// <param name="authorizationInfo"></param>
        /// <returns></returns>
        bool Save(Models.AuthorizationInfo authorizationInfo);

        /// <summary>
        /// 存储机器码信息
        /// </summary>
        /// <param name="machineCodeInfo"></param>
        /// <returns></returns>
        bool Save(Models.MachineCodeInfo machineCodeInfo);

        /// <summary>
        /// 读取授权信息
        /// </summary>
        /// <returns></returns>
        T ReadAuthorizationInfo<T>() where T: Models.AuthorizationInfo;

        /// <summary>
        /// 读取机器码信息
        /// </summary>
        /// <returns></returns>
        T ReadMachineCodeInfo<T>() where T: Models.MachineCodeInfo;
    }
}
